The specification for the JDBC API is a document which is the JAVA platform standard call-level application program interface (API) for database access. This API assumes that the database being connected to is a relational database. It is understood that relational databases have flat table structures where tables consist solely of columns and rows.
An on-line linking and embedding database is the preferred application program interface (API) for Microsoft and is used by applications running on a Window-based PC to access data from a variety of data sources, including databases both relational and non-relational, flat files, directory services and so on. JDBC (JAVA Database Connectivity) is the JAVA Application Program Interface (API) used to access data in relational databases. While typical Windows programs written in C++ or Visual Basic had, in the OLE DB (Online Linking and Embedding Database), a standardized mechanism for accessing data in a variety of data sources, however, the JAVA applications were limited to accessing only relational data sources. It is desirable to provide JAVA applications which have access to the same data as other Windows applications.
The present system and method provides a mechanism which enables a JAVA application to use JAVA database connectivity (JDBC) to access data which is made available by an OLE DB data provider.
The OLE DB API provides four basic objects that are used to access data. Each object implements a series of required and optional interfaces. The JDBC API defines over a dozen objects that can be used to access data. The JDBC driver for the OLE DB data access (designated as a Driver in this document) maps the dozen objects defined by the JDBC API to the objects in the OLE DB API. This includes mapping the methods on the JDBC object to the various interfaces on the OLE DB objects. Additionally, the OLE DB API requires that only three of the four basic objects actually be implemented. Thus, part of the solution concerns here, concerns how the Driver handles situations where an OLE DB data provider does not support an optional object or interface that is required to complete a JDBC call.
In the related prior art, there have been seen a number of systems which may be related somewhat partially to the present disclosure. These systems involve U.S. Patents which are briefly described hereinunder.
U.S. Pat. No. 6,016,499 entitled “System And Method For Accessing A Directory Service Repository” describes a method for using a relational API to data stored in another format, in this particular case for directory data, using an Application Program Interface (API) native to data. However, the present disclosure is considerably different in that it uses the JDBC API (while the cited patent uses ODBC) and the present system provides access to any data that uses OLE DB as an application program interface.
Another U.S. Pat. No. 5,893,118 is entitled “Method For Managing Globally Distributed Software Components” and describes a mechanism for locating a JAVA class using a directory service. The present invention is quite considerably different in that it is a bridge from JDBC over to the OLE DB.
Another U.S. Pat. No. 5,848,273 entitled “Method For Generating OLE Automation And IDL Interfaces From MetaData Information” describes a mechanism for generating an OLE-based API from repository MetaData. The present system and method is quite different in that no API is generated, but rather instead the system uses an existing API, namely the JDBC. Additionally, the present disclosure actually does make use of the OLE DB API.
Another possible relevant patent is U.S. Pat. No. 5,689,664 entitled “Interface Sharing Between Objects” which concerns a mechanism for reducing memory usage when an object is shared by two different processes, typically using a drag-and-drop operation. However, quite contrarily, the present system concerns database access, rather than reducing memory usage.
A further U.S. Pat. No. 5,910,804 entitled “OLE For Design And Modeling” is used to describe several tools used to do 3-D modeling and has an interface, in OLE, used by those tools to communicate the data concerning the object being modeled. This particular system is quite different from the present invention, since the present invention translates JDBC API calls into the appropriate OLE DB API calls, thus to enable JAVA applications to access data available via the OLE DB.
The presently described system can map a dozen objects as defined in the JDBC API and map them to objects in the OLE DB API.